An analog of String.Join(string, string[]) for IEnumerable<T>

Posted by abatishchev on Stack Overflow See other posts from Stack Overflow or by abatishchev
Published on 2009-06-14T19:19:59Z Indexed on 2010/04/18 7:23 UTC
Read the original article Hit count: 282

Filed under:
|
|
|

class String contains very useful method - String.Join(string, string[]).

It creates a string from an array, separating each element of array with a symbol given. But general - it doesn't add a separator after the last element! I uses it for ASP.NET coding for separating with "<br />" or Environment.NewLine.

So I want to add an empty row after each row in asp:Table. What method of IEnumerable<TableRow> can I use for the same functionality?

© Stack Overflow or respective owner

Related posts about c#

Related posts about extension-methods